(define-module (node sucrase)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix build-system node)
  #:use-module (guix packages)
  #:use-module (guix download))

;; TODO: Remove <out>/bin symlink from things that don't need it
(define-public node-any-promise-bootstrap
  (package
    (name "node-any-promise-bootstrap")
    (version "1.3.0")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "https://registry.npmjs.org/any-promise/-/any-promise-"
             version ".tgz"))
       (sha256
        (base32
         "0fjn1ckk3ds74szpk1lh2g7jjw7mzyr9ci6w12v6ckb273ssz8cv"))))
    (build-system node-build-system)
    (arguments
     '(#:tests? #f
       #:phases (modify-phases %standard-phases
                  (add-after 'install 'remove-dangling-bin
                    (lambda* (#:key outputs #:allow-other-keys)
                      (let* ((out (assoc-ref outputs "out"))
                             (bin-link (string-append out "/bin")))
                        (delete-file bin-link))
                      #t)))))
    (home-page "")
    (synopsis "")
    (description "")
    (license #f)))

(define-public node-commander-bootstrap
  (package
    (name "node-commander-bootstrap")
    (version "2.20.0")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "https://registry.npmjs.org/commander/-/commander-"
             version ".tgz"))
       (sha256
        (base32
         "10in1plyla91sphd2z86vksxn8xwgxyzip0n6k2wm2a2ny6ir2qv"))))
    (build-system node-build-system)
    (arguments
     '(#:tests? #f
       #:phases (modify-phases %standard-phases
                  (add-after 'install 'remove-dangling-bin
                    (lambda* (#:key outputs #:allow-other-keys)
                      (let* ((out (assoc-ref outputs "out"))
                             (bin-link (string-append out "/bin")))
                        (delete-file bin-link))
                      #t)))))
    (home-page "")
    (synopsis "")
    (description "")
    (license #f)))

(define-public node-lines-and-columns-bootstrap
  (package
    (name "node-lines-and-columns-bootstrap")
    (version "1.1.6")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-"
             version ".tgz"))
       (sha256
        (base32
         "09p61rikwf78jz4m8n4vad0m4wpbgzaivrrbr74sxcg13v82a83m"))))
    (build-system node-build-system)
    (arguments
     '(#:tests? #f
       #:phases (modify-phases %standard-phases
                  (delete 'build)
                  (add-after 'install 'remove-dangling-bin
                    (lambda* (#:key outputs #:allow-other-keys)
                      (let* ((out (assoc-ref outputs "out"))
                             (bin-link (string-append out "/bin")))
                        (delete-file bin-link))
                      #t)))))
    (home-page "")
    (synopsis "")
    (description "")
    (license #f)))


(define-public node-node-modules-regexp-bootstrap
  (package
    (name "node-node-modules-regexp-bootstrap")
    (version "1.0.0")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "https://registry.npmjs.org/node-modules-regexp/-/node-modules-bootstrap-"
             version ".tgz"))
       (sha256
        (base32
         "02mjlh509ajkh852dwvlrdc0sx62yfixsvby97gbnzpfxnam27qc"))))
    (build-system node-build-system)
    (arguments
     '(#:tests? #f
       #:phases (modify-phases %standard-phases
                  (add-after 'install 'remove-dangling-bin
                    (lambda* (#:key outputs #:allow-other-keys)
                      (let* ((out (assoc-ref outputs "out"))
                             (bin-link (string-append out "/bin")))
                        (delete-file bin-link))
                      #t)))))
    (home-page "")
    (synopsis "")
    (description "")
    (license #f)))

(define-public node-object-assign-bootstrap
  (package
    (name "node-object-assign-bootstrap")
    (version "4.1.1")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "https://registry.npmjs.org/object-assign/-/object-assign-"
             version ".tgz"))
       (sha256
        (base32
         "1v999sycxcp74j2pikdhyinm2d80p2bsy4nnrrnb59rv4rm74bbq"))))
    (build-system node-build-system)
    (arguments
     '(#:tests? #f
       #:phases (modify-phases %standard-phases
                  (add-after 'install 'remove-dangling-bin
                    (lambda* (#:key outputs #:allow-other-keys)
                      (let* ((out (assoc-ref outputs "out"))
                             (bin-link (string-append out "/bin")))
                        (delete-file bin-link))
                      #t)))))
    (home-page "")
    (synopsis "")
    (description "")
    (license #f)))

(define-public node-pirates-bootstrap
  (package
    (name "node-pirates-bootstrap")
    (version "4.0.1")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "https://registry.npmjs.org/pirates/-/pirates-"
             version ".tgz"))
       (sha256
        (base32
         "19hpwdlxw3prq0z10c5sxv6wbg48pg7n006mja7w7pvy4iy07j6n"))))
    (build-system node-build-system)
    (inputs
     `(("node-node-modules-regexp" ,node-node-modules-regexp-bootstrap)))
    (arguments
     '(#:tests? #f
       #:phases (modify-phases %standard-phases
                  (delete 'build)
                  (add-after 'install 'remove-dangling-bin
                    (lambda* (#:key outputs #:allow-other-keys)
                      (let* ((out (assoc-ref outputs "out"))
                             (bin-link (string-append out "/bin")))
                        (delete-file bin-link))
                      #t)))))
    (home-page "")
    (synopsis "")
    (description "")
    (license #f)))

(define-public node-thenify-bootstrap
  (package
    (name "node-thenify-bootstrap")
    (version "3.3.0")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "https://registry.npmjs.org/thenify/-/thenify-"
             version ".tgz"))
       (sha256
        (base32
         "0qp65v95adsf52vrxf5ca3nqw43hqkcjrclyhqp8z1bn3rrjwzkh"))))
    (build-system node-build-system)
    (inputs
     `(("node-any-promise" ,node-any-promise-bootstrap)))
    (arguments
     '(#:tests? #f
       #:phases (modify-phases %standard-phases
                  (add-after 'install 'remove-dangling-bin
                    (lambda* (#:key outputs #:allow-other-keys)
                      (let* ((out (assoc-ref outputs "out"))
                             (bin-link (string-append out "/bin")))
                        (delete-file bin-link))
                      #t)))))
    (home-page "")
    (synopsis "")
    (description "")
    (license #f)))

(define-public node-thenify-all-bootstrap
  (package
    (name "node-thenify-all-bootstrap")
    (version "1.6.0")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "https://registry.npmjs.org/thenify/-/thenify-"
             version ".tgz"))
       (sha256
        (base32
         "1fzcliy88iz2qzkh99jicjzf0j3snvx6jg93ga64ps08b4l6hqdh"))))
    (build-system node-build-system)
    (inputs
     `(("node-thenify" ,node-thenify-bootstrap)))
    (arguments
     '(#:tests? #f
       #:phases (modify-phases %standard-phases
                  (add-after 'install 'remove-dangling-bin
                    (lambda* (#:key outputs #:allow-other-keys)
                      (let* ((out (assoc-ref outputs "out"))
                             (bin-link (string-append out "/bin")))
                        (delete-file bin-link))
                      #t)))))
    (home-page "")
    (synopsis "")
    (description "")
    (license #f)))

(define-public node-mz-bootstrap
  (package
    (name "node-mz-bootstrap")
    (version "2.7.0")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "https://registry.npmjs.org/mz/-/mz-"
             version ".tgz"))
       (sha256
        (base32
         "0cxmswx4xgi5pv90mcx08apdg86da52r7dhv8c90l9llz18frl77"))))
    (build-system node-build-system)
    (inputs
     `(("node-any-promise" ,node-any-promise-bootstrap)
       ("node-object-assign" ,node-object-assign-bootstrap)
       ("node-thenify-all" ,node-thenify-all-bootstrap)))
    (arguments
     '(#:tests? #f
       #:phases (modify-phases %standard-phases
                  (add-after 'install 'remove-dangling-bin
                    (lambda* (#:key outputs #:allow-other-keys)
                      (let* ((out (assoc-ref outputs "out"))
                             (bin-link (string-append out "/bin")))
                        (delete-file bin-link))
                      #t)))))
    (home-page "")
    (synopsis "")
    (description "")
    (license #f)))

(define-public node-sucrase-bootstrap
  (package
    (name "node-sucrase-bootstrap")
    (version "3.10.1")
    (source
     (origin
       (method url-fetch)
       (uri (string-append
             "https://registry.npmjs.org/sucrase/-/sucrase-"
             version ".tgz"))
       (sha256
        (base32
         "1jlc17r6fkzkpawb4y8pzrxv6wglp6n94b3ww2zzzb5n7gb09p2y"))))
    (build-system node-build-system)
    (inputs
     `(("node-commander" ,node-commander-bootstrap)
       ("node-lines-and-columns" ,node-lines-and-columns-bootstrap)
       ("node-mz" ,node-mz-bootstrap)
       ("node-pirates" ,node-pirates-bootstrap)))
    (arguments
     '(#:tests? #f
       #:phases (modify-phases %standard-phases
                  (delete 'build))))
    (home-page "")
    (synopsis "")
    (description "")
    (license #f)))
